package com.tjec.project.system.service.impl;

import java.util.List;
import com.tjec.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tjec.project.system.mapper.SysRejectOpinionMapper;
import com.tjec.project.system.domain.SysRejectOpinion;
import com.tjec.project.system.service.ISysRejectOpinionService;

/**
 * 流程驳回意见Service业务层处理
 * 
 * @author tjec
 * @date 2021-04-14
 */
@Service
public class SysRejectOpinionServiceImpl implements ISysRejectOpinionService 
{
    @Autowired
    private SysRejectOpinionMapper sysRejectOpinionMapper;

    /**
     * 查询流程驳回意见
     * 
     * @param guid 流程驳回意见ID
     * @return 流程驳回意见
     */
    @Override
    public SysRejectOpinion selectSysRejectOpinionByGuid(String guid)
    {
        return sysRejectOpinionMapper.selectSysRejectOpinionByGuid(guid);
    }

    /**
     * 查询流程驳回意见列表
     * 
     * @param sysRejectOpinion 流程驳回意见
     * @return 流程驳回意见
     */
    @Override
    public List<SysRejectOpinion> selectSysRejectOpinionList(SysRejectOpinion sysRejectOpinion)
    {
        return sysRejectOpinionMapper.selectSysRejectOpinionList(sysRejectOpinion);
    }

    /**
     * 新增流程驳回意见
     * 
     * @param sysRejectOpinion 流程驳回意见
     * @return 结果
     */
    @Override
    public int insertSysRejectOpinion(SysRejectOpinion sysRejectOpinion)
    {
        sysRejectOpinion.setCreateTime(DateUtils.getNowDate());
        return sysRejectOpinionMapper.insertSysRejectOpinion(sysRejectOpinion);
    }

    /**
     * 修改流程驳回意见
     * 
     * @param sysRejectOpinion 流程驳回意见
     * @return 结果
     */
    @Override
    public int updateSysRejectOpinion(SysRejectOpinion sysRejectOpinion)
    {
        return sysRejectOpinionMapper.updateSysRejectOpinion(sysRejectOpinion);
    }

    /**
     * 批量删除流程驳回意见
     * 
     * @param guids 需要删除的流程驳回意见ID
     * @return 结果
     */
    @Override
    public int deleteSysRejectOpinionByGuids(String[] guids)
    {
        return sysRejectOpinionMapper.deleteSysRejectOpinionByGuids(guids);
    }

    /**
     * 删除流程驳回意见信息
     * 
     * @param guid 流程驳回意见ID
     * @return 结果
     */
    @Override
    public int deleteSysRejectOpinionByGuid(String guid)
    {
        return sysRejectOpinionMapper.deleteSysRejectOpinionByGuid(guid);
    }
}
